!macro customInstall
    SetRegView 64
    # 修改右键信息
    #管理员安装
    WriteRegExpandStr HKLM "SOFTWARE\Classes\md\shell\open" "" "markdown_k 打开"
    WriteRegExpandStr HKLM "SOFTWARE\Classes\md\shell\open" "Icon" "$INSTDIR\markdown_k.exe"
    # 用户安装
    WriteRegExpandStr HKCU "SOFTWARE\Classes\md\shell\open" "" "markdown_k 打开"
    WriteRegExpandStr HKCU "SOFTWARE\Classes\md\shell\open" "Icon" "$INSTDIR\markdown_k.exe"
    #刷新
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment"
    SetRegView 32
    WriteRegExpandStr HKLM "SOFTWARE\Classes\md\shell\open" "" "markdown_k 打开"
    WriteRegExpandStr HKLM "SOFTWARE\Classes\md\shell\open" "Icon" "$INSTDIR\markdown_k.exe"
    WriteRegExpandStr HKCU "SOFTWARE\Classes\md\shell\open" "" "markdown_k 打开"
    WriteRegExpandStr HKCU "SOFTWARE\Classes\md\shell\open" "Icon" "$INSTDIR\markdown_k.exe"
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment"
!macroend

!macro customUnInstall
    SetRegView 64
    # 删除 
    DeleteRegKey HKLM "SOFTWARE\Classes\md"
    DeleteRegKey HKCU "SOFTWARE\Classes\md"
    #刷新
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment"
    SetRegView 32
    DeleteRegKey HKLM "SOFTWARE\Classes\md"
    DeleteRegKey HKCU "SOFTWARE\Classes\md"
    SendMessage ${HWND_BROADCAST} ${WM_WININICHANGE} 0 "STR:Environment"
!macroend
